package com.itheima.health.job;

import com.itheima.health.service.OrderSettingService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@JobHandler(value = "heima.cleanordersetting.job")
public class CleanOrderSettingJob extends IJobHandler {
    @Autowired
    private OrderSettingService orderSettingService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        orderSettingService.deleteOrderSettingByOrderdate();
        return SUCCESS;
    }
}
